<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <meta http-equiv="x-ua-compatible" content="IE=edge" />
        <script src="__PUBLIC__/pano/pano.js"></script>
        <script type="text/javascript" src="__PUBLIC__/common/js/jquery.js"></script>
        <script type="text/javascript" src="__PUBLIC__/common/js/common.js"></script>
        <style>
            @-ms-viewport { width: device-width; }
            @media only screen and (min-device-width: 800px) { html { overflow:hidden; } }
            html { height:100%; }
            body { height:100%; overflow:hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#000000; }
            .toolbox{
                width: 100%; height: 34px; background: url(__PUBLIC__/member/images/common/web.png); overflow: hidden; bottom: 0px; position: absolute; z-index: 100000;
            }
            .toolb{
                width: auto; height: 24px; overflow: hidden; margin: 5px; float: left;
            }
            .toolb_h{
                width: auto; height: 24px; overflow: hidden; float: left; font: bold 12px/24px "微软雅黑"; cursor: default;
            }
            .toolb_b{
                width: auto; height: 24px; overflow: hidden; float: left; font: bold 12px/24px "微软雅黑"; cursor: default;
                background: url(__PUBLIC__/member/images/common/glow.png);
            }
            .toolb_e{
                width: auto; height: 24px; overflow: hidden; float: left;
            }
            .toolb_btn{
                width: 24px; height: 24px; overflow: hidden; float: left; margin-left: 2px;
                font: bold 14px/24px "微软雅黑"; text-align: center; color: #fff; cursor: pointer;
                background: url(__PUBLIC__/member/images/common/glow.png);
            }
            .toolb_btn:hover{
                background: url(__PUBLIC__/member/images/common/huang.png);
            }
            .toolinput{
                width: 36px; height: 24px; overflow: hidden; border: 0px; background: none; margin: 0 2px; text-align: center; color: #fff; cursor: default;
            }
            .sub{
                width: 50px; height: 24px; overflow: hidden; float: left; font: bold 12px/24px "微软雅黑"; cursor: pointer;
                background: url(__PUBLIC__/member/images/common/glow.png); text-align: center;
            }
        </style>
        <script type="text/javascript">
            function backhv(h,v){
                $("#ath").val(h);
                $("#atv").val(v);
            }
            var temp;
            var times = 0;
            $(function(){
                $(".toolb_btn").mousedown(function(){
                    temp = $(this);
                    funcdo();
                    times = 0;
                    $("body").everyTime("1ms","good",function(){
                        times++;
                        if(times>15){
                            funcdo();
                        }
                    });
                });
                $(".toolb_btn").mouseup(function(){
                    times = 0;
                    $("body").stopTime("good");
                });
                $(".toolinput").change(function(){
                    var value = $(this).val();
                    var kr_name = $(this).data("kr");
                    var kr_do = $(this).data("do");
                    var va = value*kr_do;
                    var kraction = "set(hotspot[spot]."+kr_name+","+va+");";
                    krpano.call(kraction);
                });
            });
            function funcdo(){
                var temp_id = temp.data("forid");
                var thevalue = $("#"+temp_id).val();
                thevalue = parseFloat(thevalue);
                var changevalue = temp.data("change");
                changevalue = parseFloat(changevalue);
                var value = thevalue + changevalue;
                $("#"+temp_id).val(value);
                var krpano = document.getElementById("krpano");
                var kr_name = temp.data("kr");
                var kr_do = temp.data("do");
                var va = value*kr_do;
                var kraction = "set(hotspot[spot]."+kr_name+","+va+");";
                krpano.call(kraction);
            }
            function backdata(){
                var ath = $("#ath").val();
                var atv = $("#atv").val();
                var scale = $("#scale").val();
                var rx = $("#rx").val();
                var ry = $("#ry").val();
                var rz = $("#rz").val();
                parent.smartback(ath,atv,scale,rx,ry,rz);
            }
        </script>
    </head>
    <body>
        <div class="toolbox">
            <input type="hidden" id="ath" value="{:cookie('spot_x')}"/>
            <input type="hidden" id="atv" value="{:cookie('spot_y')}"/>
            <div class="toolb">
                <div class="toolb_h">缩放：</div>
                <div class="toolb_b"><input class="toolinput" id="scale" data-kr="scale" data-do="0.01" value="{:cookie('scale')}" /></div>
                <div class="toolb_e">
                    <div class="toolb_btn" data-forid="scale" data-change="1" data-kr="scale" data-do="0.01">+</div>
                    <div class="toolb_btn" data-forid="scale" data-change="-1" data-kr="scale" data-do="0.01">-</div>
                </div>
            </div>
            <div class="toolb">
                <div class="toolb_h">X轴旋转：</div>
                <div class="toolb_b"><input class="toolinput" id="rx" data-kr="rx" data-do="1" value="{:cookie('rx')}" /></div>
                <div class="toolb_e">
                    <div class="toolb_btn" data-forid="rx" data-change="0.5" data-kr="rx" data-do="1">+</div>
                    <div class="toolb_btn" data-forid="rx" data-change="-0.5" data-kr="rx" data-do="1">-</div>
                </div>
            </div>
            <div class="toolb">
                <div class="toolb_h">Y轴旋转：</div>
                <div class="toolb_b"><input class="toolinput" id="ry"  data-kr="ry" data-do="1" value="{:cookie('ry')}" /></div>
                <div class="toolb_e">
                    <div class="toolb_btn" data-forid="ry" data-change="0.5" data-kr="ry" data-do="1">+</div>
                    <div class="toolb_btn" data-forid="ry" data-change="-0.5" data-kr="ry" data-do="1">-</div>
                </div>
            </div>
            <div class="toolb">
                <div class="toolb_h">Z轴旋转：</div>
                <div class="toolb_b"><input class="toolinput" id="rz" data-kr="rz" data-do="1" value="{:cookie('rz')}" /></div>
                <div class="toolb_e">
                    <div class="toolb_btn" data-forid="rz" data-change="0.5" data-kr="rz" data-do="1">+</div>
                    <div class="toolb_btn" data-forid="rz" data-change="-0.5" data-kr="rz" data-do="1">-</div>
                </div>
            </div>
            <div class="toolb">
                <div class="sub" onclick="backdata();">提交</div>
            </div>
        </div>
        <div id="pano" style="width:100%;height:100%;">
            <noscript><table style="width:100%;height:100%;"><tr style="valign:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
            <script>
                {$xmlscript}
            </script>
        </div>
    </body>
</html>
